
// an array--collection of values, all of which are of the same type
var aArray = new Array( 5 );


for( var i = 0; i < aArray.length; i = i + 1 )
{
	aArray[ i ] = 0;
}

/*
aArray[ 0 ] = 0;	// Argentina
aArray[ 1 ] = 0;	// Bolivia
aArray[ 2 ] = 0;	// Brazil
aArray[ 3 ] = 0;	// Colombia
aArray[ 4 ] = 0;	// Peru
*/

function showImage( nIndex )
{
	aArray[ nIndex ] = aArray[ nIndex ] + 1;
}




function showArgentina()
{
	aArray[ 0 ] = aArray[ 0 ] + 1;
}

function showBolivia()
{
	aArray[ 1 ] = aArray[ 1 ] + 1;
}

function showBrazil()
{
	aArray[ 2 ] = aArray[ 2 ] + 1;
}

function showColombia()
{
	aArray[ 3 ] = aArray[ 3 ] + 1;
}

function showPeru()
{
	aArray[ 4 ] = aArray[ 4 ] + 1;
}

function showCounter()
{
		
	if( aArray[ 0 ] > 0 && aArray[ 1 ] > 0 && aArray[ 2 ] > 0 
			&& aArray[ 3 ] > 0 && aArray[ 4 ] > 0 )
	{
		alert( "CONGRATULATIONS! " + aArray);
		window.location = "congrats.html"	;
	}
	else
	{
		alert( "HEY YOU KEEP CLICKING--YOU DIDN'T FINISH" );
	}
}




